package com.ease.model.system.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;

public enum AuditLogSeverityType implements OptionalEnum {
	DEBUG((short) 1, "DEBUG"), //
	// INFO(2), //
	WARN((short) 4, "WARN"), //
	ERROR((short) 8, "ERROR"); //
	// FATAL(16); //

	private short value;

	private String text;

	private AuditLogSeverityType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public final static AuditLogSeverityType get(short value) {
		return EnumUtil.get(AuditLogSeverityType.class, value, ERROR);
	}

	public final static AuditLogSeverityType get(String name) {
		return EnumUtil.get(AuditLogSeverityType.class, name, ERROR);
	}

	public String getText() {
		return text;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name();
	}

	/**
	 * @return the value
	 */
	public short getValue() {
		return value;
	}

}
